package springboot.consumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.xq.softcup.mq.client.consumer.IMqConsumer;
import org.xq.softcup.mq.client.consumer.annotation.MqConsumer;
import org.xq.softcup.mq.client.util.MqResult;

@MqConsumer(topic = "topic_1")
@Service
public class ConsumerB implements IMqConsumer {
    private Logger logger = LoggerFactory.getLogger(ConsumerB.class);

    @Override
    public MqResult consume(String data) throws Exception {
        logger.info("消费一条消息:{}", data);
        return MqResult.SUCCESS;
    }

}
